

export interface GeoserverLayerStyleOptions {
    url: string,
    layerName: string,
    styleName: string
}

export interface QueryOptions {
    featureNS: string;
    featurePrefix: string;
    featureTypes: string[];
    geometryName: string;
    srsName: string;
}

export interface WFSOptions {
    host: string; //geoserver主机地址
    name: string; //图层名称
    namespace: string; //工作空间名称
    namespaceURI: string; //工作空间URI
    geometryName: string; // geometry字段名称
    srsName: string; //坐标系
}

export interface WMSOptions {
    serverType: 'carmentaserver'|'geoserver'|'mapserver'|'qgis',
    params: { [id: string]: any },
    projection?: 'EPSG:4326'|'EPSG:3857',
    url: string;
}

export interface JSONXYOptions {
    url: string,
    x: string,
    y: string,
    projection?: 'EPSG:4326'|'EPSG:3857'
}

export interface JSONOptions {
    url: string;
}


export type LayerOptions 
    = WFSOptions
    | WMSOptions
    | JSONXYOptions
    | JSONOptions;

export enum PropertyTypes {
    String = 'String',
    Number = 'Number',
    DateTime = 'DateTime'
}

export interface FeaturePropertyType {
    name: string,
    type: PropertyTypes,
    alias: string
}

export interface ExtentOptions {
    extent: number[],
    srs?: string
}